import request from '@/utils/request';
import {clientUrl} from "@/common/service-prefix";

export interface EventParams {
  title: string;
  content: string;
  remindTime: Date;
  type: string;
  stateFlag: string;
}

export async function getList(params?: EventParams) {
  return request(`${clientUrl}/event/page`, {
    method: 'GET',
    params: params,
  });
}

export async function update(data: EventParams) {
  return request(`${clientUrl}/event`, {
    method: 'PUT',
    data: data,
  });
}

export async function save(data: EventParams) {
  return request(`${clientUrl}/event`, {
    method: 'POST',
    data: data,
  });
}
